bitkeeper revision 1.1108.33.9 (41091835q6WuyZj9PdFnpNZ9ZQ7vfw)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Thu, 29 Jul 2004 15:31:01 +0000 (15:31 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Thu, 29 Jul 2004 15:31:01 +0000 (15:31 +0000)
- for Linux 2.6, use shared defintions of the hypervisor and control interface
- cleanup and sync Linux 2.4 mkbuildtree with Linux 2.6 mkbuildtree

12 files changed:
.rootkeys
linux-2.4.26-xen-sparse/mkbuildtree
linux-2.6.7-xen-sparse/include/asm-xen/domain_controller.h [deleted file]
linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_32.h [deleted file]
linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_64.h [deleted file]
linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/dom0_ops.h [deleted file]
linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/event_channel.h [deleted file]
linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/hypervisor-if.h [deleted file]
linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/physdev.h [deleted file]
linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/sched_ctl.h [deleted file]
linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/trace.h [deleted file]
linux-2.6.7-xen-sparse/mkbuildtree

index 6f89582d4b623900c323cb159fd16d0ece429aa1..9547abccdd03993e8bb9f38c52cf9ece11f6ea3c 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/xor.h
 40f5623bqoi4GEoBiiUc6TZk1HjsMg linux-2.6.7-xen-sparse/include/asm-xen/blkif.h
 40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.7-xen-sparse/include/asm-xen/ctrl_if.h
-40f5623bDU2mp4xcHrO0ThodQ9Vs7w linux-2.6.7-xen-sparse/include/asm-xen/domain_controller.h
 40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.7-xen-sparse/include/asm-xen/evtchn.h
-40f5623bSHoOzh_pYP9ovjpUz019Aw linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_32.h
-40f5623c1uIAB_OVr5AFdoOac7zxHA linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_64.h
-40f5623cEbvTM2QIJ8G6kJoYMLvFpw linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/dom0_ops.h
-40f5623cBiv7JBB2bwezpyMwyDGN_w linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/event_channel.h
-40f5623cvr4j1BQI1I82_K5wRocUKg linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/hypervisor-if.h
-40f5623cfHK4EBsPz922OqMVkZX6OA linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/physdev.h
-40f5623cFINsV23lGJNQNbhO5kus_Q linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/sched_ctl.h
-40f5623cb_pJrLt3h_nAzvJsjsV0rQ linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/trace.h
 40f5623cndVUFlkxpf7Lfx7xu8madQ linux-2.6.7-xen-sparse/include/asm-xen/multicall.h
 40f5623cTZ80EwjWUBlh44A9F9i_Lg linux-2.6.7-xen-sparse/include/asm-xen/netif.h
 3f108af1ylCIm82H052FVTfXACBHrw linux-2.6.7-xen-sparse/include/asm-xen/proc_cmd.h
index db4d7309d04407a92486cd3e901ff1d17165848f..a2f3a2cd80e540d38dc4a484762310bbf517b425 100755 (executable)
@@ -104,21 +104,24 @@ rm -f mkbuildtree
 
 LINUX_26=${RS}/../linux-2.6.7-xen-sparse
 
-## There are a whole bunch of special symlinks, mostly for files
-## which are identical in the i386 and xen-i386 architecture-dependent
-## subdirectories.
 
-# This first symlink is special: it links to shared files in Xen's source tree
+# Create links to the shared definitions of the hypervisor interface
 rm -rf ${AD}/include/asm-xen/hypervisor-ifs
 mkdir  ${AD}/include/asm-xen/hypervisor-ifs
 cd     ${AD}/include/asm-xen/hypervisor-ifs
 relative_lndir ../../../${RS}/../xen/include/hypervisor-ifs
 
-# Another special symlink: to the shared definitions for the control interface
-cd ..
+# Create a link to the shared definitions for the control interface
+cd ${AD}/include/asm-xen
 ln -sf ../../${RS}/../tools/python/xen/lowlevel/xu/domain_controller.h
 
-# The remainder are the i386 -> xen-i386 links
+
+## Symlinks for files:
+## - which are identical in the i386 and xen-i386 architecture-dependent
+##   subdirectories.
+## - which are identical in the Linux 2.6 and Linux 2.4 ports.
+
+cd ${AD}/include/asm-xen
 ln -sf ../asm-i386/a.out.h 
 ln -sf ../asm-i386/apicdef.h 
 ln -sf ../asm-i386/apic.h 
@@ -201,7 +204,7 @@ ln -sf ../asm-i386/unistd.h
 ln -sf ../asm-i386/user.h 
 ln -sf ../../${LINUX_26}/include/asm-xen/xen_proc.h
 
-cd ../../arch/xen/kernel
+cd ${AD}/arch/xen/kernel
 ln -sf ../../i386/kernel/i387.c
 ln -sf ../../i386/kernel/init_task.c
 ln -sf ../../i386/kernel/pci-dma.c
@@ -211,7 +214,8 @@ ln -sf ../../i386/kernel/ptrace.c
 ln -sf ../../i386/kernel/semaphore.c 
 ln -sf ../../i386/kernel/sys_i386.c 
 ln -sf ../../../${LINUX_26}/arch/xen/i386/kernel/ioport.c
-cd ../lib
+
+cd ${AD}/arch/xen/lib
 ln -sf ../../i386/lib/checksum.S 
 ln -sf ../../i386/lib/dec_and_lock.c 
 ln -sf ../../i386/lib/getuser.S 
@@ -222,12 +226,16 @@ ln -sf ../../i386/lib/old-checksum.c
 ln -sf ../../i386/lib/strstr.c 
 ln -sf ../../i386/lib/usercopy.c 
 ln -sf ../../../${LINUX_26}/arch/xen/kernel/xen_proc.c
-cd ../mm
+
+cd ${AD}/arch/xen/mm
 ln -sf ../../i386/mm/extable.c 
 ln -sf ../../i386/mm/pageattr.c 
-cd ../drivers/console
+
+cd ${AD}/arch/xen/drivers/console
 ln -sf ../../../../${LINUX_26}/drivers/xen/console/console.c 
-cd ../dom0
+
+cd ${AD}/arch/xen/drivers/dom0
 ln -sf ../../../../${LINUX_26}/drivers/xen/privcmd/privcmd.c core.c
-cd ../netif/frontend
+
+cd ${AD}/arch/xen/drivers/netif/frontend
 ln -sf ../../../../../${LINUX_26}/drivers/xen/net/network.c main.c
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/domain_controller.h b/linux-2.6.7-xen-sparse/include/asm-xen/domain_controller.h
deleted file mode 100644 (file)
index 76dd164..0000000
+++ /dev/null
@@ -1,532 +0,0 @@
-/******************************************************************************
- * domain_controller.h
- * 
- * Interface to server controller (e.g., 'xend'). This header file defines the 
- * interface that is shared with guest OSes.
- * 
- * Copyright (c) 2004, K A Fraser
- */
-
-#ifndef __DOMAIN_CONTROLLER_H__
-#define __DOMAIN_CONTROLLER_H__
-
-
-#ifndef BASIC_START_INFO
-#error "Xen header file hypervisor-if.h must already be included here."
-#endif
-
-
-/*
- * EXTENDED BOOTSTRAP STRUCTURE FOR NEW DOMAINS.
- */
-
-typedef struct {
-    BASIC_START_INFO;
-    u16 domain_controller_evtchn; /* 320 */
-} PACKED extended_start_info_t; /* 322 bytes */
-#define SIF_BLK_BE_DOMAIN (1<<4)  /* Is this a block backend domain? */
-#define SIF_NET_BE_DOMAIN (1<<5)  /* Is this a net backend domain? */
-
-
-/*
- * Reason codes for SCHEDOP_shutdown. These are opaque to Xen but may be
- * interpreted by control software to determine the appropriate action. These 
- * are only really advisories: the controller can actually do as it likes.
- */
-#define SHUTDOWN_poweroff   0  /* Domain exited normally. Clean up and kill. */
-#define SHUTDOWN_reboot     1  /* Clean up, kill, and then restart.          */
-#define SHUTDOWN_suspend    2  /* Clean up, save suspend info, kill.         */
-
-
-/*
- * CONTROLLER MESSAGING INTERFACE.
- */
-
-typedef struct {
-    u8 type;     /*  0: echoed in response */
-    u8 subtype;  /*  1: echoed in response */
-    u8 id;       /*  2: echoed in response */
-    u8 length;   /*  3: number of bytes in 'msg' */
-    u8 msg[60];  /*  4: type-specific message data */
-} PACKED control_msg_t; /* 64 bytes */
-
-#define CONTROL_RING_SIZE 8
-typedef u32 CONTROL_RING_IDX;
-#define MASK_CONTROL_IDX(_i) ((_i)&(CONTROL_RING_SIZE-1))
-
-typedef struct {
-    control_msg_t tx_ring[CONTROL_RING_SIZE];   /*    0: guest -> controller */
-    control_msg_t rx_ring[CONTROL_RING_SIZE];   /*  512: controller -> guest */
-    CONTROL_RING_IDX tx_req_prod, tx_resp_prod; /* 1024, 1028 */
-    CONTROL_RING_IDX rx_req_prod, rx_resp_prod; /* 1032, 1036 */
-} PACKED control_if_t; /* 1040 bytes */
-
-/*
- * Top-level command types.
- */
-#define CMSG_CONSOLE        0  /* Console                 */
-#define CMSG_BLKIF_BE       1  /* Block-device backend    */
-#define CMSG_BLKIF_FE       2  /* Block-device frontend   */
-#define CMSG_NETIF_BE       3  /* Network-device backend  */
-#define CMSG_NETIF_FE       4  /* Network-device frontend */
-#define CMSG_SHUTDOWN       6  /* Shutdown messages       */
-
-
-/******************************************************************************
- * CONSOLE DEFINITIONS
- */
-
-/*
- * Subtypes for console messages.
- */
-#define CMSG_CONSOLE_DATA       0
-
-
-/******************************************************************************
- * BLOCK-INTERFACE FRONTEND DEFINITIONS
- */
-
-/* Messages from domain controller to guest. */
-#define CMSG_BLKIF_FE_INTERFACE_STATUS_CHANGED   0
-
-/* Messages from guest to domain controller. */
-#define CMSG_BLKIF_FE_DRIVER_STATUS_CHANGED     32
-#define CMSG_BLKIF_FE_INTERFACE_CONNECT         33
-#define CMSG_BLKIF_FE_INTERFACE_DISCONNECT      34
-
-/* These are used by both front-end and back-end drivers. */
-#define blkif_vdev_t   u16
-#define blkif_pdev_t   u16
-#define blkif_sector_t u64
-
-/*
- * CMSG_BLKIF_FE_INTERFACE_STATUS_CHANGED:
- *  Notify a guest about a status change on one of its block interfaces.
- *  If the interface is DESTROYED or DOWN then the interface is disconnected:
- *   1. The shared-memory frame is available for reuse.
- *   2. Any unacknowledged messgaes pending on the interface were dropped.
- */
-#define BLKIF_INTERFACE_STATUS_DESTROYED    0 /* Interface doesn't exist.    */
-#define BLKIF_INTERFACE_STATUS_DISCONNECTED 1 /* Exists but is disconnected. */
-#define BLKIF_INTERFACE_STATUS_CONNECTED    2 /* Exists and is connected.    */
-typedef struct {
-    u32 handle; /*  0 */
-    u32 status; /*  4 */
-    u16 evtchn; /*  8: (only if status == BLKIF_INTERFACE_STATUS_CONNECTED). */
-} PACKED blkif_fe_interface_status_changed_t; /* 10 bytes */
-
-/*
- * CMSG_BLKIF_FE_DRIVER_STATUS_CHANGED:
- *  Notify the domain controller that the front-end driver is DOWN or UP.
- *  When the driver goes DOWN then the controller will send no more
- *  status-change notifications. When the driver comes UP then the controller
- *  will send a notification for each interface that currently exists.
- *  If the driver goes DOWN while interfaces are still UP, the domain
- *  will automatically take the interfaces DOWN.
- */
-#define BLKIF_DRIVER_STATUS_DOWN   0
-#define BLKIF_DRIVER_STATUS_UP     1
-typedef struct {
-    /* IN */
-    u32 status;        /*  0: BLKIF_DRIVER_STATUS_??? */
-    /* OUT */
-    /*
-     * Tells driver how many interfaces it should expect to immediately
-     * receive notifications about.
-     */
-    u32 nr_interfaces; /*  4 */
-} PACKED blkif_fe_driver_status_changed_t; /* 8 bytes */
-
-/*
- * CMSG_BLKIF_FE_INTERFACE_CONNECT:
- *  If successful, the domain controller will acknowledge with a
- *  STATUS_CONNECTED message.
- */
-typedef struct {
-    u32      handle;      /*  0 */
-    u32      __pad;
-    memory_t shmem_frame; /*  8 */
-    MEMORY_PADDING;
-} PACKED blkif_fe_interface_connect_t; /* 16 bytes */
-
-/*
- * CMSG_BLKIF_FE_INTERFACE_DISCONNECT:
- *  If successful, the domain controller will acknowledge with a
- *  STATUS_DISCONNECTED message.
- */
-typedef struct {
-    u32 handle; /*  0 */
-} PACKED blkif_fe_interface_disconnect_t; /* 4 bytes */
-
-
-/******************************************************************************
- * BLOCK-INTERFACE BACKEND DEFINITIONS
- */
-
-/* Messages from domain controller. */
-#define CMSG_BLKIF_BE_CREATE      0  /* Create a new block-device interface. */
-#define CMSG_BLKIF_BE_DESTROY     1  /* Destroy a block-device interface.    */
-#define CMSG_BLKIF_BE_CONNECT     2  /* Connect i/f to remote driver.        */
-#define CMSG_BLKIF_BE_DISCONNECT  3  /* Disconnect i/f from remote driver.   */
-#define CMSG_BLKIF_BE_VBD_CREATE  4  /* Create a new VBD for an interface.   */
-#define CMSG_BLKIF_BE_VBD_DESTROY 5  /* Delete a VBD from an interface.      */
-#define CMSG_BLKIF_BE_VBD_GROW    6  /* Append an extent to a given VBD.     */
-#define CMSG_BLKIF_BE_VBD_SHRINK  7  /* Remove last extent from a given VBD. */
-
-/* Messages to domain controller. */
-#define CMSG_BLKIF_BE_DRIVER_STATUS_CHANGED 32
-
-/*
- * Message request/response definitions for block-device messages.
- */
-
-typedef struct {
-    blkif_sector_t sector_start;   /*  0 */
-    blkif_sector_t sector_length;  /*  8 */
-    blkif_pdev_t   device;         /* 16 */
-    u16            __pad;          /* 18 */
-} PACKED blkif_extent_t; /* 20 bytes */
-
-/* Non-specific 'okay' return. */
-#define BLKIF_BE_STATUS_OKAY                0
-/* Non-specific 'error' return. */
-#define BLKIF_BE_STATUS_ERROR               1
-/* The following are specific error returns. */
-#define BLKIF_BE_STATUS_INTERFACE_EXISTS    2
-#define BLKIF_BE_STATUS_INTERFACE_NOT_FOUND 3
-#define BLKIF_BE_STATUS_INTERFACE_CONNECTED 4
-#define BLKIF_BE_STATUS_VBD_EXISTS          5
-#define BLKIF_BE_STATUS_VBD_NOT_FOUND       6
-#define BLKIF_BE_STATUS_OUT_OF_MEMORY       7
-#define BLKIF_BE_STATUS_EXTENT_NOT_FOUND    8
-#define BLKIF_BE_STATUS_MAPPING_ERROR       9
-
-/* This macro can be used to create an array of descriptive error strings. */
-#define BLKIF_BE_STATUS_ERRORS {    \
-    "Okay",                         \
-    "Non-specific error",           \
-    "Interface already exists",     \
-    "Interface not found",          \
-    "Interface is still connected", \
-    "VBD already exists",           \
-    "VBD not found",                \
-    "Out of memory",                \
-    "Extent not found for VBD",     \
-    "Could not map domain memory" }
-
-/*
- * CMSG_BLKIF_BE_CREATE:
- *  When the driver sends a successful response then the interface is fully
- *  created. The controller will send a DOWN notification to the front-end
- *  driver.
- */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Domain attached to new interface.   */
-    u32        blkif_handle;  /*  4: Domain-specific interface handle.   */
-    /* OUT */
-    u32        status;        /*  8 */
-} PACKED blkif_be_create_t; /* 12 bytes */
-
-/*
- * CMSG_BLKIF_BE_DESTROY:
- *  When the driver sends a successful response then the interface is fully
- *  torn down. The controller will send a DESTROYED notification to the
- *  front-end driver.
- */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Identify interface to be destroyed. */
-    u32        blkif_handle;  /*  4: ...ditto...                         */
-    /* OUT */
-    u32        status;        /*  8 */
-} PACKED blkif_be_destroy_t; /* 12 bytes */
-
-/*
- * CMSG_BLKIF_BE_CONNECT:
- *  When the driver sends a successful response then the interface is fully
- *  connected. The controller will send a CONNECTED notification to the
- *  front-end driver.
- */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Domain attached to new interface.   */
-    u32        blkif_handle;  /*  4: Domain-specific interface handle.   */
-    memory_t   shmem_frame;   /*  8: Page cont. shared comms window.     */
-    MEMORY_PADDING;
-    u32        evtchn;        /* 16: Event channel for notifications.    */
-    /* OUT */
-    u32        status;        /* 20 */
-} PACKED blkif_be_connect_t;  /* 24 bytes */
-
-/*
- * CMSG_BLKIF_BE_DISCONNECT:
- *  When the driver sends a successful response then the interface is fully
- *  disconnected. The controller will send a DOWN notification to the front-end
- *  driver.
- */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Domain attached to new interface.   */
-    u32        blkif_handle;  /*  4: Domain-specific interface handle.   */
-    /* OUT */
-    u32        status;        /*  8 */
-} PACKED blkif_be_disconnect_t; /* 12 bytes */
-
-/* CMSG_BLKIF_BE_VBD_CREATE */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Identify blkdev interface.          */
-    u32        blkif_handle;  /*  4: ...ditto...                         */
-    blkif_vdev_t vdevice;     /*  8: Interface-specific id for this VBD. */
-    u16        readonly;      /* 10: Non-zero -> VBD isn't writeable.    */
-    /* OUT */
-    u32        status;        /* 12 */
-} PACKED blkif_be_vbd_create_t; /* 16 bytes */
-
-/* CMSG_BLKIF_BE_VBD_DESTROY */
-typedef struct {
-    /* IN */
-    domid_t    domid;         /*  0: Identify blkdev interface.          */
-    u32        blkif_handle;  /*  4: ...ditto...                         */
-    blkif_vdev_t vdevice;     /*  8: Interface-specific id of the VBD.   */
-    u16        __pad;         /* 10 */
-    /* OUT */
-    u32        status;        /* 12 */
-} PACKED blkif_be_vbd_destroy_t; /* 16 bytes */
-
-/* CMSG_BLKIF_BE_VBD_GROW */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Identify blkdev interface.          */
-    u32        blkif_handle;  /*  4: ...ditto...                         */
-    blkif_extent_t extent;    /*  8: Physical extent to append to VBD.   */
-    blkif_vdev_t vdevice;     /* 28: Interface-specific id of the VBD.   */
-    u16        __pad;         /* 30 */
-    /* OUT */
-    u32        status;        /* 32 */
-} PACKED blkif_be_vbd_grow_t; /* 36 bytes */
-
-/* CMSG_BLKIF_BE_VBD_SHRINK */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Identify blkdev interface.          */
-    u32        blkif_handle;  /*  4: ...ditto...                         */
-    blkif_vdev_t vdevice;     /*  8: Interface-specific id of the VBD.   */
-    u16        __pad;         /* 10 */
-    /* OUT */
-    u32        status;        /* 12 */
-} PACKED blkif_be_vbd_shrink_t; /* 16 bytes */
-
-/*
- * CMSG_BLKIF_BE_DRIVER_STATUS_CHANGED:
- *  Notify the domain controller that the back-end driver is DOWN or UP.
- *  If the driver goes DOWN while interfaces are still UP, the controller
- *  will automatically send DOWN notifications.
- */
-typedef struct {
-    u32        status;        /*  0: BLKIF_DRIVER_STATUS_??? */
-} PACKED blkif_be_driver_status_changed_t; /* 4 bytes */
-
-
-/******************************************************************************
- * NETWORK-INTERFACE FRONTEND DEFINITIONS
- */
-
-/* Messages from domain controller to guest. */
-#define CMSG_NETIF_FE_INTERFACE_STATUS_CHANGED   0
-
-/* Messages from guest to domain controller. */
-#define CMSG_NETIF_FE_DRIVER_STATUS_CHANGED     32
-#define CMSG_NETIF_FE_INTERFACE_CONNECT         33
-#define CMSG_NETIF_FE_INTERFACE_DISCONNECT      34
-
-/*
- * CMSG_NETIF_FE_INTERFACE_STATUS_CHANGED:
- *  Notify a guest about a status change on one of its network interfaces.
- *  If the interface is DESTROYED or DOWN then the interface is disconnected:
- *   1. The shared-memory frame is available for reuse.
- *   2. Any unacknowledged messgaes pending on the interface were dropped.
- */
-#define NETIF_INTERFACE_STATUS_DESTROYED    0 /* Interface doesn't exist.    */
-#define NETIF_INTERFACE_STATUS_DISCONNECTED 1 /* Exists but is disconnected. */
-#define NETIF_INTERFACE_STATUS_CONNECTED    2 /* Exists and is connected.    */
-typedef struct {
-    u32        handle; /*  0 */
-    u32        status; /*  4 */
-    u16        evtchn; /*  8: status == NETIF_INTERFACE_STATUS_CONNECTED */
-    u8         mac[6]; /* 10: status == NETIF_INTERFACE_STATUS_CONNECTED */
-} PACKED netif_fe_interface_status_changed_t; /* 16 bytes */
-
-/*
- * CMSG_NETIF_FE_DRIVER_STATUS_CHANGED:
- *  Notify the domain controller that the front-end driver is DOWN or UP.
- *  When the driver goes DOWN then the controller will send no more
- *  status-change notifications. When the driver comes UP then the controller
- *  will send a notification for each interface that currently exists.
- *  If the driver goes DOWN while interfaces are still UP, the domain
- *  will automatically take the interfaces DOWN.
- */
-#define NETIF_DRIVER_STATUS_DOWN   0
-#define NETIF_DRIVER_STATUS_UP     1
-typedef struct {
-    /* IN */
-    u32        status;        /*  0: NETIF_DRIVER_STATUS_??? */
-    /* OUT */
-    /*
-     * Tells driver how many interfaces it should expect to immediately
-     * receive notifications about.
-     */
-    u32        nr_interfaces; /*  4 */
-} PACKED netif_fe_driver_status_changed_t; /* 8 bytes */
-
-/*
- * CMSG_NETIF_FE_INTERFACE_CONNECT:
- *  If successful, the domain controller will acknowledge with a
- *  STATUS_CONNECTED message.
- */
-typedef struct {
-    u32        handle;         /*  0 */
-    u32        __pad;          /*  4 */
-    memory_t   tx_shmem_frame; /*  8 */
-    MEMORY_PADDING;
-    memory_t   rx_shmem_frame; /* 16 */
-    MEMORY_PADDING;
-} PACKED netif_fe_interface_connect_t; /* 24 bytes */
-
-/*
- * CMSG_NETIF_FE_INTERFACE_DISCONNECT:
- *  If successful, the domain controller will acknowledge with a
- *  STATUS_DISCONNECTED message.
- */
-typedef struct {
-    u32        handle;        /*  0 */
-} PACKED netif_fe_interface_disconnect_t; /* 4 bytes */
-
-
-/******************************************************************************
- * NETWORK-INTERFACE BACKEND DEFINITIONS
- */
-
-/* Messages from domain controller. */
-#define CMSG_NETIF_BE_CREATE      0  /* Create a new net-device interface. */
-#define CMSG_NETIF_BE_DESTROY     1  /* Destroy a net-device interface.    */
-#define CMSG_NETIF_BE_CONNECT     2  /* Connect i/f to remote driver.        */
-#define CMSG_NETIF_BE_DISCONNECT  3  /* Disconnect i/f from remote driver.   */
-
-/* Messages to domain controller. */
-#define CMSG_NETIF_BE_DRIVER_STATUS_CHANGED 32
-
-/*
- * Message request/response definitions for net-device messages.
- */
-
-/* Non-specific 'okay' return. */
-#define NETIF_BE_STATUS_OKAY                0
-/* Non-specific 'error' return. */
-#define NETIF_BE_STATUS_ERROR               1
-/* The following are specific error returns. */
-#define NETIF_BE_STATUS_INTERFACE_EXISTS    2
-#define NETIF_BE_STATUS_INTERFACE_NOT_FOUND 3
-#define NETIF_BE_STATUS_INTERFACE_CONNECTED 4
-#define NETIF_BE_STATUS_OUT_OF_MEMORY       5
-#define NETIF_BE_STATUS_MAPPING_ERROR       6
-
-/* This macro can be used to create an array of descriptive error strings. */
-#define NETIF_BE_STATUS_ERRORS {    \
-    "Okay",                         \
-    "Non-specific error",           \
-    "Interface already exists",     \
-    "Interface not found",          \
-    "Interface is still connected", \
-    "Out of memory",                \
-    "Could not map domain memory" }
-
-/*
- * CMSG_NETIF_BE_CREATE:
- *  When the driver sends a successful response then the interface is fully
- *  created. The controller will send a DOWN notification to the front-end
- *  driver.
- */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Domain attached to new interface.   */
-    u32        netif_handle;  /*  4: Domain-specific interface handle.   */
-    u8         mac[6];        /*  8 */
-    u16        __pad;         /* 14 */
-    /* OUT */
-    u32        status;        /* 16 */
-} PACKED netif_be_create_t; /* 20 bytes */
-
-/*
- * CMSG_NETIF_BE_DESTROY:
- *  When the driver sends a successful response then the interface is fully
- *  torn down. The controller will send a DESTROYED notification to the
- *  front-end driver.
- */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Identify interface to be destroyed. */
-    u32        netif_handle;  /*  4: ...ditto...                         */
-    /* OUT */
-    u32   status;             /*  8 */
-} PACKED netif_be_destroy_t; /* 12 bytes */
-
-/*
- * CMSG_NETIF_BE_CONNECT:
- *  When the driver sends a successful response then the interface is fully
- *  connected. The controller will send a CONNECTED notification to the
- *  front-end driver.
- */
-typedef struct { 
-    /* IN */
-    domid_t    domid;          /*  0: Domain attached to new interface.   */
-    u32        netif_handle;   /*  4: Domain-specific interface handle.   */
-    memory_t   tx_shmem_frame; /*  8: Page cont. tx shared comms window.  */
-    MEMORY_PADDING;
-    memory_t   rx_shmem_frame; /* 16: Page cont. rx shared comms window.  */
-    MEMORY_PADDING;
-    u16        evtchn;         /* 24: Event channel for notifications.    */
-    u16        __pad;          /* 26 */
-    /* OUT */
-    u32        status;         /* 28 */
-} PACKED netif_be_connect_t; /* 32 bytes */
-
-/*
- * CMSG_NETIF_BE_DISCONNECT:
- *  When the driver sends a successful response then the interface is fully
- *  disconnected. The controller will send a DOWN notification to the front-end
- *  driver.
- */
-typedef struct { 
-    /* IN */
-    domid_t    domid;         /*  0: Domain attached to new interface.   */
-    u32        netif_handle;  /*  4: Domain-specific interface handle.   */
-    /* OUT */
-    u32        status;        /*  8 */
-} PACKED netif_be_disconnect_t; /* 12 bytes */
-
-/*
- * CMSG_NETIF_BE_DRIVER_STATUS_CHANGED:
- *  Notify the domain controller that the back-end driver is DOWN or UP.
- *  If the driver goes DOWN while interfaces are still UP, the domain
- *  will automatically send DOWN notifications.
- */
-typedef struct {
-    u32        status;        /*  0: NETIF_DRIVER_STATUS_??? */
-} PACKED netif_be_driver_status_changed_t; /* 4 bytes */
-
-
-/******************************************************************************
- * SHUTDOWN DEFINITIONS
- */
-
-/*
- * Subtypes for shutdown messages.
- */
-#define CMSG_SHUTDOWN_POWEROFF  0   /* Clean shutdown (SHUTDOWN_poweroff).   */
-#define CMSG_SHUTDOWN_REBOOT    1   /* Clean shutdown (SHUTDOWN_reboot).     */
-#define CMSG_SHUTDOWN_SUSPEND   2   /* Create suspend info, then             */
-                                    /* SHUTDOWN_suspend.                     */
-
-#endif /* __DOMAIN_CONTROLLER_H__ */
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_32.h b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_32.h
deleted file mode 100644 (file)
index 80055a5..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/******************************************************************************
- * arch-i386/hypervisor-if.h
- * 
- * Guest OS interface to x86 32-bit Xen.
- */
-
-#ifndef __HYPERVISOR_IF_I386_H__
-#define __HYPERVISOR_IF_I386_H__
-
-/*
- * Pointers and other address fields inside interface structures are padded to
- * 64 bits. This means that field alignments aren't different between 32- and
- * 64-bit architectures. 
- */
-/* NB. Multi-level macro ensures __LINE__ is expanded before concatenation. */
-#define __MEMORY_PADDING(_X) u32 __pad_ ## _X
-#define _MEMORY_PADDING(_X)  __MEMORY_PADDING(_X)
-#define MEMORY_PADDING       _MEMORY_PADDING(__LINE__)
-
-/*
- * SEGMENT DESCRIPTOR TABLES
- */
-/*
- * A number of GDT entries are reserved by Xen. These are not situated at the
- * start of the GDT because some stupid OSes export hard-coded selector values
- * in their ABI. These hard-coded values are always near the start of the GDT,
- * so Xen places itself out of the way.
- * 
- * NB. The reserved range is inclusive (that is, both FIRST_RESERVED_GDT_ENTRY
- * and LAST_RESERVED_GDT_ENTRY are reserved).
- */
-#define NR_RESERVED_GDT_ENTRIES    40
-#define FIRST_RESERVED_GDT_ENTRY   256
-#define LAST_RESERVED_GDT_ENTRY    \
-  (FIRST_RESERVED_GDT_ENTRY + NR_RESERVED_GDT_ENTRIES - 1)
-
-
-/*
- * These flat segments are in the Xen-private section of every GDT. Since these
- * are also present in the initial GDT, many OSes will be able to avoid
- * installing their own GDT.
- */
-#define FLAT_RING1_CS 0x0819    /* GDT index 259 */
-#define FLAT_RING1_DS 0x0821    /* GDT index 260 */
-#define FLAT_RING3_CS 0x082b    /* GDT index 261 */
-#define FLAT_RING3_DS 0x0833    /* GDT index 262 */
-
-#define FLAT_GUESTOS_CS FLAT_RING1_CS
-#define FLAT_GUESTOS_DS FLAT_RING1_DS
-#define FLAT_USER_CS    FLAT_RING3_CS
-#define FLAT_USER_DS    FLAT_RING3_DS
-
-/* And the trap vector is... */
-#define TRAP_INSTR "int $0x82"
-
-
-/*
- * Virtual addresses beyond this are not modifiable by guest OSes. The 
- * machine->physical mapping table starts at this address, read-only.
- */
-#define HYPERVISOR_VIRT_START (0xFC000000UL)
-#ifndef machine_to_phys_mapping
-#define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
-#endif
-
-#ifndef __ASSEMBLY__
-
-/* NB. Both the following are 32 bits each. */
-typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
-typedef unsigned long cpureg_t;   /* Full-sized register.                    */
-
-/*
- * Send an array of these to HYPERVISOR_set_trap_table()
- */
-#define TI_GET_DPL(_ti)      ((_ti)->flags & 3)
-#define TI_GET_IF(_ti)       ((_ti)->flags & 4)
-#define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
-#define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
-typedef struct {
-    u8       vector;  /* 0: exception vector                              */
-    u8       flags;   /* 1: 0-3: privilege level; 4: clear event enable?  */
-    u16      cs;      /* 2: code selector                                 */
-    memory_t address; /* 4: code address                                  */
-} PACKED trap_info_t; /* 8 bytes */
-
-typedef struct
-{
-    unsigned long ebx;
-    unsigned long ecx;
-    unsigned long edx;
-    unsigned long esi;
-    unsigned long edi;
-    unsigned long ebp;
-    unsigned long eax;
-    unsigned long ds;
-    unsigned long es;
-    unsigned long fs;
-    unsigned long gs;
-    unsigned long _unused;
-    unsigned long eip;
-    unsigned long cs;
-    unsigned long eflags;
-    unsigned long esp;
-    unsigned long ss;
-} PACKED execution_context_t;
-
-typedef struct {
-    u32  tsc_bits;      /* 0: 32 bits read from the CPU's TSC. */
-    u32  tsc_bitshift;  /* 4: 'tsc_bits' uses N:N+31 of TSC.   */
-} PACKED tsc_timestamp_t; /* 8 bytes */
-
-/*
- * The following is all CPU context. Note that the i387_ctxt block is filled 
- * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
- */
-typedef struct {
-#define ECF_I387_VALID (1<<0)
-    unsigned long flags;
-    execution_context_t cpu_ctxt;           /* User-level CPU registers     */
-    char          fpu_ctxt[256];            /* User-level FPU registers     */
-    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
-    unsigned int  fast_trap_idx;            /* "Fast trap" vector offset    */
-    unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
-    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
-    unsigned long guestos_ss, guestos_esp;  /* Virtual TSS (only SS1/ESP1)  */
-    unsigned long pt_base;                  /* CR3 (pagetable base)         */
-    unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
-    unsigned long event_callback_cs;        /* CS:EIP of event callback     */
-    unsigned long event_callback_eip;
-    unsigned long failsafe_callback_cs;     /* CS:EIP of failsafe callback  */
-    unsigned long failsafe_callback_eip;
-} PACKED full_execution_context_t;
-
-#define ARCH_HAS_FAST_TRAP
-
-#endif
-
-#endif
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_64.h b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/arch-x86_64.h
deleted file mode 100644 (file)
index 701084c..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/******************************************************************************
- * arch-x86_64/hypervisor-if.h
- * 
- * Guest OS interface to AMD x86-64 bit Xen.
- */
-
-#ifndef __HYPERVISOR_IF_X86_64_H__
-#define __HYPERVISOR_IF_X86_64_H__
-
-/* Pointers are naturally 64 bits in this architecture; no padding needed. */
-#define _MEMORY_PADDING(_X)
-#define MEMORY_PADDING 
-
-/*
- * SEGMENT DESCRIPTOR TABLES
- */
-/*
- * A number of GDT entries are reserved by Xen. These are not situated at the
- * start of the GDT because some stupid OSes export hard-coded selector values
- * in their ABI. These hard-coded values are always near the start of the GDT,
- * so Xen places itself out of the way.
- * 
- * NB. The reserved range is inclusive (that is, both FIRST_RESERVED_GDT_ENTRY
- * and LAST_RESERVED_GDT_ENTRY are reserved).
- */
-#define NR_RESERVED_GDT_ENTRIES    40 
-#define FIRST_RESERVED_GDT_ENTRY   256
-#define LAST_RESERVED_GDT_ENTRY    \
-  (FIRST_RESERVED_GDT_ENTRY + NR_RESERVED_GDT_ENTRIES - 1)
-
-/*
- * 64-bit segment selectors
- * These flat segments are in the Xen-private section of every GDT. Since these
- * are also present in the initial GDT, many OSes will be able to avoid
- * installing their own GDT.
- */
-
-#define FLAT_RING3_CS32 0x0823  /* GDT index 260 */
-#define FLAT_RING3_CS64 0x082b  /* GDT index 261 */
-#define FLAT_RING3_DS   0x0833  /* GDT index 262 */
-
-#define FLAT_GUESTOS_DS   FLAT_RING3_DS
-#define FLAT_GUESTOS_CS   FLAT_RING3_CS64
-#define FLAT_GUESTOS_CS32 FLAT_RING3_CS32
-
-#define FLAT_USER_DS      FLAT_RING3_DS
-#define FLAT_USER_CS      FLAT_RING3_CS64
-#define FLAT_USER_CS32    FLAT_RING3_CS32
-
-/* And the trap vector is... */
-#define TRAP_INSTR "syscall"
-
-/* The machine->physical mapping table starts at this address, read-only. */
-#ifndef machine_to_phys_mapping
-#define machine_to_phys_mapping ((unsigned long *)0xffff810000000000ULL)
-#endif
-
-#ifndef __ASSEMBLY__
-
-/* NB. Both the following are 64 bits each. */
-typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
-typedef unsigned long cpureg_t;   /* Full-sized register.                    */
-
-/*
- * Send an array of these to HYPERVISOR_set_trap_table()
- */
-#define TI_GET_DPL(_ti)      ((_ti)->flags & 3)
-#define TI_GET_IF(_ti)       ((_ti)->flags & 4)
-#define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
-#define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
-typedef struct {
-    u8       vector;  /* 0: exception vector                              */
-    u8       flags;   /* 1: 0-3: privilege level; 4: clear event enable?  */
-    u16      cs;      /* 2: code selector                                 */
-    u32      __pad;   /* 4 */
-    memory_t address; /* 8: code address                                  */
-} PACKED trap_info_t; /* 16 bytes */
-
-typedef struct
-{
-    unsigned long r15;
-    unsigned long r14;
-    unsigned long r13;
-    unsigned long r12;
-    unsigned long rbp;
-    unsigned long rbx;
-    unsigned long r11;
-    unsigned long r10;
-    unsigned long r9;
-    unsigned long r8;
-    unsigned long rax;
-    unsigned long rcx;
-    unsigned long rdx;
-    unsigned long rsi;
-    unsigned long rdi;
-    unsigned long rip;
-    unsigned long cs;
-    unsigned long eflags;
-    unsigned long rsp;
-    unsigned long ss;
-} PACKED execution_context_t;
-
-/*
- * NB. This may become a 64-bit count with no shift. If this happens then the 
- * structure size will still be 8 bytes, so no other alignments will change.
- */
-typedef struct {
-    u32  tsc_bits;      /* 0: 32 bits read from the CPU's TSC. */
-    u32  tsc_bitshift;  /* 4: 'tsc_bits' uses N:N+31 of TSC.   */
-} PACKED tsc_timestamp_t; /* 8 bytes */
-
-/*
- * The following is all CPU context. Note that the i387_ctxt block is filled 
- * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
- */
-typedef struct {
-#define ECF_I387_VALID (1<<0)
-    unsigned long flags;
-    execution_context_t cpu_ctxt;           /* User-level CPU registers     */
-    char          fpu_ctxt[512];            /* User-level FPU registers     */
-    trap_info_t   trap_ctxt[256];           /* Virtual IDT                  */
-    unsigned long ldt_base, ldt_ents;       /* LDT (linear address, # ents) */
-    unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
-    unsigned long guestos_ss, guestos_esp;  /* Virtual TSS (only SS1/ESP1)  */
-    unsigned long pt_base;                  /* CR3 (pagetable base)         */
-    unsigned long debugreg[8];              /* DB0-DB7 (debug registers)    */
-    unsigned long event_callback_cs;        /* CS:EIP of event callback     */
-    unsigned long event_callback_eip;
-    unsigned long failsafe_callback_cs;     /* CS:EIP of failsafe callback  */
-    unsigned long failsafe_callback_eip;
-} PACKED full_execution_context_t;
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* __HYPERVISOR_IF_H__ */
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/dom0_ops.h b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/dom0_ops.h
deleted file mode 100644 (file)
index 9cb5656..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
-/******************************************************************************
- * dom0_ops.h
- * 
- * Process command requests from domain-0 guest OS.
- * 
- * Copyright (c) 2002-2003, B Dragovic
- * Copyright (c) 2002-2004, K Fraser
- */
-
-
-#ifndef __DOM0_OPS_H__
-#define __DOM0_OPS_H__
-
-#include "hypervisor-if.h"
-#include "sched_ctl.h"
-
-/*
- * Make sure you increment the interface version whenever you modify this file!
- * This makes sure that old versions of dom0 tools will stop working in a
- * well-defined way (rather than crashing the machine, for instance).
- */
-#define DOM0_INTERFACE_VERSION   0xAAAA0010
-
-#define MAX_DOMAIN_NAME    16
-
-/************************************************************************/
-
-#define DOM0_GETMEMLIST        2
-typedef struct {
-    /* IN variables. */
-    domid_t       domain;             /*  0 */
-    u32           __pad;
-    memory_t      max_pfns;           /*  8 */
-    MEMORY_PADDING;
-    void         *buffer;             /* 16 */
-    MEMORY_PADDING;
-    /* OUT variables. */
-    memory_t      num_pfns;           /* 24 */
-    MEMORY_PADDING;
-} PACKED dom0_getmemlist_t; /* 32 bytes */
-
-#define DOM0_SCHEDCTL          6
- /* struct sched_ctl_cmd is from sched-ctl.h   */
-typedef struct sched_ctl_cmd dom0_schedctl_t;
-
-#define DOM0_ADJUSTDOM         7
-/* struct sched_adjdom_cmd is from sched-ctl.h */
-typedef struct sched_adjdom_cmd dom0_adjustdom_t;
-
-#define DOM0_CREATEDOMAIN      8
-typedef struct {
-    /* IN parameters. */
-    memory_t     memory_kb;           /*  0 */
-    MEMORY_PADDING;
-    u8           name[MAX_DOMAIN_NAME]; /*  8 */
-    u32          cpu;                 /* 24 */
-    u32          __pad;               /* 28 */
-    /* OUT parameters. */
-    domid_t      domain;              /* 32 */
-} PACKED dom0_createdomain_t; /* 36 bytes */
-
-#define DOM0_DESTROYDOMAIN     9
-typedef struct {
-    /* IN variables. */
-    domid_t      domain;              /*  0 */
-} PACKED dom0_destroydomain_t; /* 4 bytes */
-
-#define DOM0_PAUSEDOMAIN      10
-typedef struct {
-    /* IN parameters. */
-    domid_t domain;                   /*  0 */
-} PACKED dom0_pausedomain_t; /* 4 bytes */
-
-#define DOM0_UNPAUSEDOMAIN    11
-typedef struct {
-    /* IN parameters. */
-    domid_t domain;                   /*  0 */
-} PACKED dom0_unpausedomain_t; /* 4 bytes */
-
-#define DOM0_GETDOMAININFO    12
-typedef struct {
-    /* IN variables. */
-    domid_t  domain;                  /*  0 */ /* NB. IN/OUT variable. */
-    /* OUT variables. */
-#define DOMFLAGS_DYING     (1<<0) /* Domain is scheduled to die.             */
-#define DOMFLAGS_CRASHED   (1<<1) /* Crashed domain; frozen for postmortem.  */
-#define DOMFLAGS_SHUTDOWN  (1<<2) /* The guest OS has shut itself down.      */
-#define DOMFLAGS_PAUSED    (1<<3) /* Currently paused by control software.   */
-#define DOMFLAGS_BLOCKED   (1<<4) /* Currently blocked pending an event.     */
-#define DOMFLAGS_RUNNING   (1<<5) /* Domain is currently running.            */
-#define DOMFLAGS_CPUMASK      255 /* CPU to which this domain is bound.      */
-#define DOMFLAGS_CPUSHIFT       8
-#define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code.  */
-#define DOMFLAGS_SHUTDOWNSHIFT 16
-    u32      flags;                   /*  4 */
-    u8       name[MAX_DOMAIN_NAME];   /*  8 */
-    full_execution_context_t *ctxt;   /* 24 */ /* NB. IN/OUT variable. */
-    MEMORY_PADDING;
-    memory_t tot_pages;               /* 32 */
-    MEMORY_PADDING;
-    memory_t max_pages;               /* 40 */
-    MEMORY_PADDING;
-    memory_t shared_info_frame;       /* 48: MFN of shared_info struct */
-    MEMORY_PADDING;
-    u64      cpu_time;                /* 56 */
-} PACKED dom0_getdomaininfo_t; /* 64 bytes */
-
-#define DOM0_BUILDDOMAIN      13
-typedef struct {
-    /* IN variables. */
-    domid_t                 domain;   /*  0 */
-    u32                     __pad;    /*  4 */
-    /* IN/OUT parameters */
-    full_execution_context_t *ctxt;   /*  8 */
-    MEMORY_PADDING;
-} PACKED dom0_builddomain_t; /* 16 bytes */
-
-#define DOM0_IOPL             14
-typedef struct {
-    domid_t domain;                   /*  0 */
-    u32     iopl;                     /*  4 */
-} PACKED dom0_iopl_t; /* 8 bytes */
-
-#define DOM0_MSR              15
-typedef struct {
-    /* IN variables. */
-    u32 write;                        /*  0 */
-    u32 cpu_mask;                     /*  4 */
-    u32 msr;                          /*  8 */
-    u32 in1;                          /* 12 */
-    u32 in2;                          /* 16 */
-    /* OUT variables. */
-    u32 out1;                         /* 20 */
-    u32 out2;                         /* 24 */
-} PACKED dom0_msr_t; /* 28 bytes */
-
-#define DOM0_DEBUG            16
-typedef struct {
-    /* IN variables. */
-    domid_t domain;                   /*  0 */
-    u8  opcode;                       /*  4 */
-    u8  __pad0, __pad1, __pad2;
-    u32 in1;                          /*  8 */
-    u32 in2;                          /* 12 */
-    u32 in3;                          /* 16 */
-    u32 in4;                          /* 20 */
-    /* OUT variables. */
-    u32 status;                       /* 24 */
-    u32 out1;                         /* 28 */
-    u32 out2;                         /* 32 */
-} PACKED dom0_debug_t; /* 36 bytes */
-
-/*
- * Set clock such that it would read <secs,usecs> after 00:00:00 UTC,
- * 1 January, 1970 if the current system time was <system_time>.
- */
-#define DOM0_SETTIME          17
-typedef struct {
-    /* IN variables. */
-    u32 secs;                         /*  0 */
-    u32 usecs;                        /*  4 */
-    u64 system_time;                  /*  8 */
-} PACKED dom0_settime_t; /* 16 bytes */
-
-#define DOM0_GETPAGEFRAMEINFO 18
-#define NOTAB 0         /* normal page */
-#define L1TAB (1<<28)
-#define L2TAB (2<<28)
-#define L3TAB (3<<28)
-#define L4TAB (4<<28)
-#define XTAB  (0xf<<28) /* invalid page */
-#define LTAB_MASK XTAB
-typedef struct {
-    /* IN variables. */
-    memory_t pfn;          /*  0: Machine page frame number to query.       */
-    MEMORY_PADDING;
-    domid_t domain;        /*  8: To which domain does the frame belong?    */
-    /* OUT variables. */
-    /* Is the page PINNED to a type? */
-    u32 type;              /* 12: see above type defs */
-} PACKED dom0_getpageframeinfo_t; /* 16 bytes */
-
-/*
- * Read console content from Xen buffer ring.
- */
-#define DOM0_READCONSOLE      19
-typedef struct {
-    memory_t str;                     /*  0 */
-    MEMORY_PADDING;
-    u32      count;                   /*  8 */
-    u32      cmd;                     /* 12 */
-} PACKED dom0_readconsole_t; /* 16 bytes */
-
-/* 
- * Pin Domain to a particular CPU  (use -1 to unpin)
- */
-#define DOM0_PINCPUDOMAIN     20
-typedef struct {
-    /* IN variables. */
-    domid_t      domain;              /*  0 */
-    s32          cpu;                 /*  4: -1 implies unpin */
-} PACKED dom0_pincpudomain_t; /* 8 bytes */
-
-/* Get trace buffers physical base pointer */
-#define DOM0_GETTBUFS         21
-typedef struct {
-    /* OUT variables */
-    memory_t phys_addr;   /*  0: location of the trace buffers       */
-    MEMORY_PADDING;
-    u32      size;        /*  8: size of each trace buffer, in bytes */
-} PACKED dom0_gettbufs_t; /* 12 bytes */
-
-/*
- * Get physical information about the host machine
- */
-#define DOM0_PHYSINFO         22
-typedef struct {
-    u32      ht_per_core;             /*  0 */
-    u32      cores;                   /*  4 */
-    u32      cpu_khz;                 /*  8 */
-    u32      __pad;                   /* 12 */
-    memory_t total_pages;             /* 16 */
-    MEMORY_PADDING;
-    memory_t free_pages;              /* 24 */
-    MEMORY_PADDING;
-} PACKED dom0_physinfo_t; /* 32 bytes */
-
-/* 
- * Allow a domain access to a physical PCI device
- */
-#define DOM0_PCIDEV_ACCESS    23
-typedef struct {
-    /* IN variables. */
-    domid_t      domain;              /*  0 */
-    u32          bus;                 /*  4 */
-    u32          dev;                 /*  8 */
-    u32          func;                /* 12 */
-    u32          enable;              /* 16 */
-} PACKED dom0_pcidev_access_t; /* 20 bytes */
-
-/*
- * Get the ID of the current scheduler.
- */
-#define DOM0_SCHED_ID        24
-typedef struct {
-    /* OUT variable */
-    u32 sched_id;                     /*  0 */
-} PACKED dom0_sched_id_t; /* 4 bytes */
-
-/* 
- * Control shadow pagetables operation
- */
-#define DOM0_SHADOW_CONTROL  25
-
-#define DOM0_SHADOW_CONTROL_OP_OFF         0
-#define DOM0_SHADOW_CONTROL_OP_ENABLE_TEST 1
-#define DOM0_SHADOW_CONTROL_OP_ENABLE_LOGDIRTY 2
-#define DOM0_SHADOW_CONTROL_OP_ENABLE_TRANSLATE 3
-#define DOM0_SHADOW_CONTROL_OP_FLUSH       10     /* table ops */
-#define DOM0_SHADOW_CONTROL_OP_CLEAN       11
-#define DOM0_SHADOW_CONTROL_OP_PEEK        12
-#define DOM0_SHADOW_CONTROL_OP_CLEAN2      13
-
-typedef struct dom0_shadow_control
-{
-    u32 fault_count;
-    u32 dirty_count;
-    u32 dirty_net_count;     
-    u32 dirty_block_count;     
-} dom0_shadow_control_stats_t;
-
-typedef struct {
-    /* IN variables. */
-    domid_t        domain;            /*  0 */
-    u32            op;                /*  4 */
-    unsigned long *dirty_bitmap;      /*  8: pointer to locked buffer */
-    MEMORY_PADDING;
-    /* IN/OUT variables. */
-    memory_t       pages;  /* 16: size of buffer, updated with actual size */
-    MEMORY_PADDING;
-    /* OUT variables. */
-    dom0_shadow_control_stats_t stats;
-} PACKED dom0_shadow_control_t;
-
-
-#define DOM0_SETDOMAINNAME     26
-typedef struct {
-    /* IN variables. */
-    domid_t  domain;                  /*  0 */
-    u8       name[MAX_DOMAIN_NAME];   /*  4 */
-} PACKED dom0_setdomainname_t; /* 20 bytes */
-
-#define DOM0_SETDOMAININITIALMEM   27
-typedef struct {
-    /* IN variables. */
-    domid_t     domain;               /*  0 */
-    u32         __pad;
-    memory_t    initial_memkb;        /*  8 */
-    MEMORY_PADDING;
-} PACKED dom0_setdomaininitialmem_t; /* 16 bytes */
-
-#define DOM0_SETDOMAINMAXMEM   28
-typedef struct {
-    /* IN variables. */
-    domid_t     domain;               /*  0 */
-    u32         __pad;
-    memory_t    max_memkb;            /*  8 */
-    MEMORY_PADDING;
-} PACKED dom0_setdomainmaxmem_t; /* 16 bytes */
-
-#define DOM0_GETPAGEFRAMEINFO2 29   /* batched interface */
-typedef struct {
-    /* IN variables. */
-    domid_t  domain;                  /*  0 */
-    u32         __pad;
-    memory_t num;                     /*  8 */
-    MEMORY_PADDING;
-    /* IN/OUT variables. */
-    unsigned long *array;             /* 16 */
-    MEMORY_PADDING;
-} PACKED dom0_getpageframeinfo2_t; /* 24 bytes */
-
-typedef struct {
-    u32 cmd;                          /* 0 */
-    u32 interface_version;            /* 4 */ /* DOM0_INTERFACE_VERSION */
-    union {                           /* 8 */
-       u32                      dummy[18]; /* 72 bytes */
-        dom0_createdomain_t      createdomain;
-        dom0_pausedomain_t       pausedomain;
-        dom0_unpausedomain_t     unpausedomain;
-        dom0_destroydomain_t     destroydomain;
-        dom0_getmemlist_t        getmemlist;
-        dom0_schedctl_t          schedctl;
-        dom0_adjustdom_t         adjustdom;
-        dom0_builddomain_t       builddomain;
-        dom0_getdomaininfo_t     getdomaininfo;
-        dom0_getpageframeinfo_t  getpageframeinfo;
-        dom0_iopl_t              iopl;
-       dom0_msr_t               msr;
-       dom0_debug_t             debug;
-       dom0_settime_t           settime;
-       dom0_readconsole_t       readconsole;
-       dom0_pincpudomain_t      pincpudomain;
-        dom0_gettbufs_t          gettbufs;
-        dom0_physinfo_t          physinfo;
-        dom0_pcidev_access_t     pcidev_access;
-        dom0_sched_id_t          sched_id;
-       dom0_shadow_control_t    shadow_control;
-       dom0_setdomainname_t     setdomainname;
-       dom0_setdomaininitialmem_t setdomaininitialmem;
-       dom0_setdomainmaxmem_t   setdomainmaxmem;
-       dom0_getpageframeinfo2_t getpageframeinfo2;
-    } PACKED u;
-} PACKED dom0_op_t; /* 80 bytes */
-
-#endif /* __DOM0_OPS_H__ */
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/event_channel.h b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/event_channel.h
deleted file mode 100644 (file)
index 5868cab..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/******************************************************************************
- * event_channel.h
- * 
- * Event channels between domains.
- * 
- * Copyright (c) 2003-2004, K A Fraser.
- */
-
-#ifndef __HYPERVISOR_IFS__EVENT_CHANNEL_H__
-#define __HYPERVISOR_IFS__EVENT_CHANNEL_H__
-
-/*
- * EVTCHNOP_bind_interdomain: Open an event channel between <dom1> and <dom2>.
- * NOTES:
- *  1. <dom1> and/or <dom2> may be specified as DOMID_SELF.
- *  2. Only a sufficiently-privileged domain may create an event channel.
- *  3. <port1> and <port2> are only supplied if the op succeeds.
- */
-#define EVTCHNOP_bind_interdomain 0
-typedef struct {
-    /* IN parameters. */
-    domid_t dom1, dom2;               /*  0,  4 */
-    /* OUT parameters. */
-    u32     port1, port2;             /*  8, 12 */
-} PACKED evtchn_bind_interdomain_t; /* 16 bytes */
-
-/*
- * EVTCHNOP_bind_virq: Bind a local event channel to IRQ <irq>.
- * NOTES:
- *  1. A virtual IRQ may be bound to at most one event channel per domain.
- */
-#define EVTCHNOP_bind_virq        1
-typedef struct {
-    /* IN parameters. */
-    u32 virq;                         /*  0 */
-    /* OUT parameters. */
-    u32 port;                         /*  4 */
-} PACKED evtchn_bind_virq_t; /* 8 bytes */
-
-/*
- * EVTCHNOP_bind_pirq: Bind a local event channel to IRQ <irq>.
- * NOTES:
- *  1. A physical IRQ may be bound to at most one event channel per domain.
- *  2. Only a sufficiently-privileged domain may bind to a physical IRQ.
- */
-#define EVTCHNOP_bind_pirq        2
-typedef struct {
-    /* IN parameters. */
-    u32 pirq;                         /*  0 */
-#define BIND_PIRQ__WILL_SHARE 1
-    u32 flags; /* BIND_PIRQ__* */     /*  4 */
-    /* OUT parameters. */
-    u32 port;                         /*  8 */
-} PACKED evtchn_bind_pirq_t; /* 12 bytes */
-
-/*
- * EVTCHNOP_close: Close the communication channel which has an endpoint at
- * <dom, port>.
- * NOTES:
- *  1. <dom> may be specified as DOMID_SELF.
- *  2. Only a sufficiently-privileged domain may close an event channel
- *     for which <dom> is not DOMID_SELF.
- */
-#define EVTCHNOP_close            3
-typedef struct {
-    /* IN parameters. */
-    domid_t dom;                      /*  0 */
-    u32     port;                     /*  4 */
-    /* No OUT parameters. */
-} PACKED evtchn_close_t; /* 8 bytes */
-
-/*
- * EVTCHNOP_send: Send an event to the remote end of the channel whose local
- * endpoint is <DOMID_SELF, local_port>.
- */
-#define EVTCHNOP_send             4
-typedef struct {
-    /* IN parameters. */
-    u32     local_port;               /*  0 */
-    /* No OUT parameters. */
-} PACKED evtchn_send_t; /* 4 bytes */
-
-/*
- * EVTCHNOP_status: Get the current status of the communication channel which
- * has an endpoint at <dom, port>.
- * NOTES:
- *  1. <dom> may be specified as DOMID_SELF.
- *  2. Only a sufficiently-privileged domain may obtain the status of an event
- *     channel for which <dom> is not DOMID_SELF.
- */
-#define EVTCHNOP_status           5
-typedef struct {
-    /* IN parameters */
-    domid_t dom;                      /*  0 */
-    u32     port;                     /*  4 */
-    /* OUT parameters */
-#define EVTCHNSTAT_closed       0  /* Chennel is not in use.                 */
-#define EVTCHNSTAT_unbound      1  /* Channel is not bound to a source.      */
-#define EVTCHNSTAT_interdomain  2  /* Channel is connected to remote domain. */
-#define EVTCHNSTAT_pirq         3  /* Channel is bound to a phys IRQ line.   */
-#define EVTCHNSTAT_virq         4  /* Channel is bound to a virtual IRQ line */
-    u32     status;                   /*  8 */
-    union {                           /* 12 */
-        struct {
-            domid_t dom;                              /* 12 */
-            u32     port;                             /* 16 */
-        } PACKED interdomain; /* EVTCHNSTAT_interdomain */
-        u32 pirq;      /* EVTCHNSTAT_pirq        */   /* 12 */
-        u32 virq;      /* EVTCHNSTAT_virq        */   /* 12 */
-    } PACKED u;
-} PACKED evtchn_status_t; /* 20 bytes */
-
-typedef struct {
-    u32 cmd; /* EVTCHNOP_* */         /*  0 */
-    u32 __reserved;                   /*  4 */
-    union {                           /*  8 */
-        evtchn_bind_interdomain_t bind_interdomain;
-        evtchn_bind_virq_t        bind_virq;
-        evtchn_bind_pirq_t        bind_pirq;
-        evtchn_close_t            close;
-        evtchn_send_t             send;
-        evtchn_status_t           status;
-        u8                        __dummy[24];
-    } PACKED u;
-} PACKED evtchn_op_t; /* 32 bytes */
-
-#endif /* __HYPERVISOR_IFS__EVENT_CHANNEL_H__ */
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/hypervisor-if.h b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/hypervisor-if.h
deleted file mode 100644 (file)
index b6231e5..0000000
+++ /dev/null
@@ -1,395 +0,0 @@
-/******************************************************************************
- * hypervisor-if.h
- * 
- * Guest OS interface to Xen.
- */
-
-#ifndef __HYPERVISOR_IF_H__
-#define __HYPERVISOR_IF_H__
-
-/* GCC-specific way to pack structure definitions (no implicit padding). */
-#define PACKED __attribute__ ((packed))
-
-#if defined(__i386__)
-#include "arch-x86_32.h"
-#elif defined(__x86_64__)
-#include "arch-x86_64.h"
-#else
-#error "Unsupported architecture"
-#endif
-
-/*
- * HYPERVISOR "SYSTEM CALLS"
- */
-
-/* EAX = vector; EBX, ECX, EDX, ESI, EDI = args 1, 2, 3, 4, 5. */
-#define __HYPERVISOR_set_trap_table        0
-#define __HYPERVISOR_mmu_update            1
-#define __HYPERVISOR_set_gdt               2
-#define __HYPERVISOR_stack_switch          3
-#define __HYPERVISOR_set_callbacks         4
-#define __HYPERVISOR_fpu_taskswitch        5
-#define __HYPERVISOR_sched_op              6
-#define __HYPERVISOR_dom0_op               7
-#define __HYPERVISOR_set_debugreg          8
-#define __HYPERVISOR_get_debugreg          9
-#define __HYPERVISOR_update_descriptor    10
-#define __HYPERVISOR_set_fast_trap        11
-#define __HYPERVISOR_dom_mem_op           12
-#define __HYPERVISOR_multicall            13
-#define __HYPERVISOR_update_va_mapping    14
-#define __HYPERVISOR_set_timer_op         15
-#define __HYPERVISOR_event_channel_op     16
-#define __HYPERVISOR_xen_version          17
-#define __HYPERVISOR_console_io           18
-#define __HYPERVISOR_physdev_op           19
-#define __HYPERVISOR_update_va_mapping_otherdomain 20
-
-/*
- * MULTICALLS
- * 
- * Multicalls are listed in an array, with each element being a fixed size 
- * (BYTES_PER_MULTICALL_ENTRY). Each is of the form (op, arg1, ..., argN)
- * where each element of the tuple is a machine word. 
- */
-#define ARGS_PER_MULTICALL_ENTRY 8
-
-
-/* 
- * VIRTUAL INTERRUPTS
- * 
- * Virtual interrupts that a guest OS may receive from the hypervisor.
- */
-#define VIRQ_MISDIRECT  0  /* Catch-all interrupt for unbound VIRQs.      */
-#define VIRQ_TIMER      1  /* Timebase update, and/or requested timeout.  */
-#define VIRQ_DEBUG      2  /* Request guest to dump debug info.           */
-#define VIRQ_CONSOLE    3  /* (DOM0) bytes received on emergency console. */
-#define VIRQ_DOM_EXC    4  /* (DOM0) Exceptional event for some domain.   */
-#define NR_VIRQS        5
-
-/*
- * MMU-UPDATE REQUESTS
- * 
- * HYPERVISOR_mmu_update() accepts a list of (ptr, val) pairs.
- * ptr[1:0] specifies the appropriate MMU_* command.
- * 
- * GPS (General-Purpose Subject)
- * -----------------------------
- *  This domain that must own all non-page-table pages that are involved in
- *  MMU updates. By default it is the domain that executes mmu_update(). If the
- *  caller has sufficient privilege then it can be changed by executing
- *  MMUEXT_SET_SUBJECTDOM.
- * 
- * PTS (Page-Table Subject)
- * ------------------------
- *  This domain must own all the page-table pages that are subject to MMU
- *  updates. By default it is the domain that executes mmu_update(). If the
- *  caller has sufficient privilege then it can be changed by executing
- *  MMUEXT_SET_SUBJECTDOM with val[14] (SET_PAGETABLE_SUBJECTDOM) set.
- * 
- * ptr[1:0] == MMU_NORMAL_PT_UPDATE:
- * Updates an entry in a page table.
- * ptr[:2]  -- machine address of the page-table entry to modify [1]
- * val      -- value to write [2]
- * 
- * ptr[1:0] == MMU_MACHPHYS_UPDATE:
- * Updates an entry in the machine->pseudo-physical mapping table.
- * ptr[:2]  -- machine address within the frame whose mapping to modify [3]
- * val      -- value to write into the mapping entry
- *  
- * ptr[1:0] == MMU_EXTENDED_COMMAND:
- * val[7:0] -- MMUEXT_* command
- * 
- *   val[7:0] == MMUEXT_(UN)PIN_*_TABLE:
- *   ptr[:2]  -- machine address of frame to be (un)pinned as a p.t. page [1]
- * 
- *   val[7:0] == MMUEXT_NEW_BASEPTR:
- *   ptr[:2]  -- machine address of new page-table base to install in MMU [1]
- * 
- *   val[7:0] == MMUEXT_TLB_FLUSH:
- *   no additional arguments
- * 
- *   val[7:0] == MMUEXT_INVLPG:
- *   ptr[:2]  -- linear address to be flushed from the TLB
- * 
- *   val[7:0] == MMUEXT_SET_LDT:
- *   ptr[:2]  -- linear address of LDT base (NB. must be page-aligned)
- *   val[:8]  -- number of entries in LDT
- * 
- *   val[7:0] == MMUEXT_SET_SUBJECTDOM:
- *   val[14]  -- if TRUE then sets the PTS in addition to the GPS.
- *   (ptr[31:15],val[31:15]) -- dom[31:0]
- * 
- *   val[7:0] == MMUEXT_REASSIGN_PAGE:
- *   ptr[:2]  -- machine address within page to be reassigned to the GPS.
- * 
- *   val[7:0] == MMUEXT_RESET_SUBJECTDOM:
- *   Resets both the GPS and the PTS to their defaults (i.e., calling domain).
- * 
- * Notes on constraints on the above arguments:
- *  [1] The page frame containing the machine address must belong to the PTS.
- *  [2] If the PTE is valid (i.e., bit 0 is set) then the specified page frame
- *      must belong to: 
- *       (a) the PTS (if the PTE is part of a non-L1 table); or
- *       (b) the GPS (if the PTE is part of an L1 table).
- *  [3] The page frame containing the machine address must belong to the GPS.
- */
-#define MMU_NORMAL_PT_UPDATE     0 /* checked '*ptr = val'. ptr is MA.       */
-#define MMU_MACHPHYS_UPDATE      2 /* ptr = MA of frame to modify entry for  */
-#define MMU_EXTENDED_COMMAND     3 /* least 8 bits of val demux further      */
-#define MMUEXT_PIN_L1_TABLE      0 /* ptr = MA of frame to pin               */
-#define MMUEXT_PIN_L2_TABLE      1 /* ptr = MA of frame to pin               */
-#define MMUEXT_PIN_L3_TABLE      2 /* ptr = MA of frame to pin               */
-#define MMUEXT_PIN_L4_TABLE      3 /* ptr = MA of frame to pin               */
-#define MMUEXT_UNPIN_TABLE       4 /* ptr = MA of frame to unpin             */
-#define MMUEXT_NEW_BASEPTR       5 /* ptr = MA of new pagetable base         */
-#define MMUEXT_TLB_FLUSH         6 /* ptr = NULL                             */
-#define MMUEXT_INVLPG            7 /* ptr = VA to invalidate                 */
-#define MMUEXT_SET_LDT           8 /* ptr = VA of table; val = # entries     */
-#define MMUEXT_SET_SUBJECTDOM    9 /* (ptr[31:15],val[31:15]) = dom[31:0]    */
-#define SET_PAGETABLE_SUBJECTDOM (1<<14) /* OR into 'val' arg of SUBJECTDOM  */
-#define MMUEXT_REASSIGN_PAGE    10
-#define MMUEXT_RESET_SUBJECTDOM 11
-#define MMUEXT_CMD_MASK        255
-#define MMUEXT_CMD_SHIFT         8
-
-/* These are passed as 'flags' to update_va_mapping. They can be ORed. */
-#define UVMF_FLUSH_TLB          1 /* Flush entire TLB. */
-#define UVMF_INVLPG             2 /* Flush the VA mapping being updated. */
-
-
-/*
- * Commands to HYPERVISOR_sched_op().
- */
-#define SCHEDOP_yield           0   /* Give up the CPU voluntarily.       */
-#define SCHEDOP_block           1   /* Block until an event is received.  */
-#define SCHEDOP_shutdown        2   /* Stop executing this domain.        */
-#define SCHEDOP_cmdmask       255   /* 8-bit command. */
-#define SCHEDOP_reasonshift     8   /* 8-bit reason code. (SCHEDOP_shutdown) */
-
-/*
- * Commands to HYPERVISOR_console_io().
- */
-#define CONSOLEIO_write         0
-#define CONSOLEIO_read          1
-
-/*
- * Commands to HYPERVISOR_dom_mem_op().
- */
-#define MEMOP_increase_reservation 0
-#define MEMOP_decrease_reservation 1
-
-#ifndef __ASSEMBLY__
-
-typedef u32 domid_t;
-/* DOMID_SELF is used in certain contexts to refer to oneself. */
-#define DOMID_SELF (0x7FFFFFFEU)
-
-/*
- * Send an array of these to HYPERVISOR_mmu_update().
- * NB. The fields are natural pointer/address size for this architecture.
- */
-typedef struct
-{
-    memory_t ptr;    /* Machine address of PTE. */
-    memory_t val;    /* New contents of PTE.    */
-} PACKED mmu_update_t;
-
-/*
- * Send an array of these to HYPERVISOR_multicall().
- * NB. The fields are natural register size for this architecture.
- */
-typedef struct
-{
-    cpureg_t op;
-    cpureg_t args[7];
-} PACKED multicall_entry_t;
-
-/* Event channel endpoints per domain. */
-#define NR_EVENT_CHANNELS 1024
-
-/* No support for multi-processor guests. */
-#define MAX_VIRT_CPUS 1
-
-/*
- * Xen/guestos shared data -- pointer provided in start_info.
- * NB. We expect that this struct is smaller than a page.
- */
-typedef struct shared_info_st
-{
-    /*
-     * Per-VCPU information goes here. This will be cleaned up more when Xen 
-     * actually supports multi-VCPU guests.
-     */
-    struct {
-        /*
-         * 'evtchn_upcall_pending' is written non-zero by Xen to indicate
-         * a pending notification for a particular VCPU. It is then cleared 
-         * by the guest OS /before/ checking for pending work, thus avoiding
-         * a set-and-check race. Note that the mask is only accessed by Xen
-         * on the CPU that is currently hosting the VCPU. This means that the
-         * pending and mask flags can be updated by the guest without special
-         * synchronisation (i.e., no need for the x86 LOCK prefix).
-         * This may seem suboptimal because if the pending flag is set by
-         * a different CPU then an IPI may be scheduled even when the mask
-         * is set. However, note:
-         *  1. The task of 'interrupt holdoff' is covered by the per-event-
-         *     channel mask bits. A 'noisy' event that is continually being
-         *     triggered can be masked at source at this very precise
-         *     granularity.
-         *  2. The main purpose of the per-VCPU mask is therefore to restrict
-         *     reentrant execution: whether for concurrency control, or to
-         *     prevent unbounded stack usage. Whatever the purpose, we expect
-         *     that the mask will be asserted only for short periods at a time,
-         *     and so the likelihood of a 'spurious' IPI is suitably small.
-         * The mask is read before making an event upcall to the guest: a
-         * non-zero mask therefore guarantees that the VCPU will not receive
-         * an upcall activation. The mask is cleared when the VCPU requests
-         * to block: this avoids wakeup-waiting races.
-         */
-        u8 evtchn_upcall_pending;
-        u8 evtchn_upcall_mask;
-        u8 pad0, pad1;
-    } PACKED vcpu_data[MAX_VIRT_CPUS];  /*   0 */
-
-    /*
-     * A domain can have up to 1024 "event channels" on which it can send
-     * and receive asynchronous event notifications. There are three classes
-     * of event that are delivered by this mechanism:
-     *  1. Bi-directional inter- and intra-domain connections. Domains must
-     *     arrange out-of-band to set up a connection (usually the setup
-     *     is initiated and organised by a privileged third party such as
-     *     software running in domain 0).
-     *  2. Physical interrupts. A domain with suitable hardware-access
-     *     privileges can bind an event-channel port to a physical interrupt
-     *     source.
-     *  3. Virtual interrupts ('events'). A domain can bind an event-channel
-     *     port to a virtual interrupt source, such as the virtual-timer
-     *     device or the emergency console.
-     * 
-     * Event channels are addressed by a "port index" between 0 and 1023.
-     * Each channel is associated with two bits of information:
-     *  1. PENDING -- notifies the domain that there is a pending notification
-     *     to be processed. This bit is cleared by the guest.
-     *  2. MASK -- if this bit is clear then a 0->1 transition of PENDING
-     *     will cause an asynchronous upcall to be scheduled. This bit is only
-     *     updated by the guest. It is read-only within Xen. If a channel
-     *     becomes pending while the channel is masked then the 'edge' is lost
-     *     (i.e., when the channel is unmasked, the guest must manually handle
-     *     pending notifications as no upcall will be scheduled by Xen).
-     * 
-     * To expedite scanning of pending notifications, any 0->1 pending
-     * transition on an unmasked channel causes a corresponding bit in a
-     * 32-bit selector to be set. Each bit in the selector covers a 32-bit
-     * word in the PENDING bitfield array.
-     */
-    u32 evtchn_pending[32];             /*   4 */
-    u32 evtchn_pending_sel;             /* 132 */
-    u32 evtchn_mask[32];                /* 136 */
-
-    /*
-     * Time: The following abstractions are exposed: System Time, Clock Time,
-     * Domain Virtual Time. Domains can access Cycle counter time directly.
-     */
-    u64                cpu_freq;        /* 264: CPU frequency (Hz).          */
-
-    /*
-     * The following values are updated periodically (and not necessarily
-     * atomically!). The guest OS detects this because 'time_version1' is
-     * incremented just before updating these values, and 'time_version2' is
-     * incremented immediately after. See the Xen-specific Linux code for an
-     * example of how to read these values safely (arch/xen/kernel/time.c).
-     */
-    u32                time_version1;   /* 272 */
-    u32                time_version2;   /* 276 */
-    tsc_timestamp_t    tsc_timestamp;   /* TSC at last update of time vals.  */
-    u64                system_time;     /* Time, in nanosecs, since boot.    */
-    u32                wc_sec;          /* Secs  00:00:00 UTC, Jan 1, 1970.  */
-    u32                wc_usec;         /* Usecs 00:00:00 UTC, Jan 1, 1970.  */
-    u64                domain_time;     /* Domain virtual time, in nanosecs. */
-
-    /*
-     * Timeout values:
-     * Allow a domain to specify a timeout value in system time and 
-     * domain virtual time.
-     */
-    u64                wall_timeout;    /* 312 */
-    u64                domain_timeout;  /* 320 */
-
-    execution_context_t execution_context; /* 328 */
-
-} PACKED shared_info_t;
-
-/*
- * Start-of-day memory layout for the initial domain (DOM0):
- *  1. The domain is started within contiguous virtual-memory region.
- *  2. The contiguous region begins and ends on an aligned 4MB boundary.
- *  3. The region start corresponds to the load address of the OS image.
- *     If the load address is not 4MB aligned then the address is rounded down.
- *  4. This the order of bootstrap elements in the initial virtual region:
- *      a. relocated kernel image
- *      b. initial ram disk              [mod_start, mod_len]
- *      c. list of allocated page frames [mfn_list, nr_pages]
- *      d. bootstrap page tables         [pt_base, CR3 (x86)]
- *      e. start_info_t structure        [register ESI (x86)]
- *      f. bootstrap stack               [register ESP (x86)]
- *  5. Bootstrap elements are packed together, but each is 4kB-aligned.
- *  6. The initial ram disk may be omitted.
- *  7. The list of page frames forms a contiguous 'pseudo-physical' memory
- *     layout for the domain. In particular, the bootstrap virtual-memory
- *     region is a 1:1 mapping to the first section of the pseudo-physical map.
- *  8. All bootstrap elements are mapped read-writeable for the guest OS. The
- *     only exception is the bootstrap page table, which is mapped read-only.
- *  9. There is guaranteed to be at least 512kB padding after the final
- *     bootstrap element. If necessary, the bootstrap virtual region is
- *     extended by an extra 4MB to ensure this.
- */
-
-/*
- * This is the basic bootstrap information structure as passed by Xen to the
- * initial controller domain. We want this structure to be easily extended by
- * more sophisticated domain builders and controllers, so we make the basic
- * fields of this structure available via a BASIC_START_INFO macro.
- * 
- * Extended version of start_info_t should be defined as:
- *  typedef struct {
- *      BASIC_START_INFO;
- *      <...extra fields...>
- *  } extended_start_info_t;
- */
-#define MAX_CMDLINE 256
-#define BASIC_START_INFO                                                      \
-    /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.     */ \
-    memory_t nr_pages;       /*  0: Total pages allocated to this domain. */  \
-    _MEMORY_PADDING(A);                                                       \
-    memory_t shared_info;    /*  8: MACHINE address of shared info struct.*/  \
-    _MEMORY_PADDING(B);                                                       \
-    u32      flags;          /* 16: SIF_xxx flags.                        */  \
-    u32      __pad;                                                           \
-    /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME).      */ \
-    memory_t pt_base;        /* 24: VIRTUAL address of page directory.    */  \
-    _MEMORY_PADDING(C);                                                       \
-    memory_t nr_pt_frames;   /* 32: Number of bootstrap p.t. frames.      */  \
-    _MEMORY_PADDING(D);                                                       \
-    memory_t mfn_list;       /* 40: VIRTUAL address of page-frame list.   */  \
-    _MEMORY_PADDING(E);                                                       \
-    memory_t mod_start;      /* 48: VIRTUAL address of pre-loaded module. */  \
-    _MEMORY_PADDING(F);                                                       \
-    memory_t mod_len;        /* 56: Size (bytes) of pre-loaded module.    */  \
-    _MEMORY_PADDING(G);                                                       \
-    u8 cmd_line[MAX_CMDLINE] /* 64 */
-
-typedef struct {
-    BASIC_START_INFO;
-} PACKED start_info_t; /* 320 bytes */
-
-/* These flags are passed in the 'flags' field of start_info_t. */
-#define SIF_PRIVILEGED    (1<<0)  /* Is the domain privileged? */
-#define SIF_INITDOMAIN    (1<<1)  /* Is this the initial control domain? */
-
-/* For use in guest OSes. */
-extern shared_info_t *HYPERVISOR_shared_info;
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* __HYPERVISOR_IF_H__ */
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/physdev.h b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/physdev.h
deleted file mode 100644 (file)
index 4e1aa13..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
- ****************************************************************************
- * (c) 2004 - Rolf Neugebauer - Intel Research Cambridge
- * (c) 2004 - Keir Fraser - University of Cambridge
- ****************************************************************************
- * Description: Interface for domains to access physical devices on the PCI bus
- */
-
-#ifndef __HYPERVISOR_IFS_PHYSDEV_H__
-#define __HYPERVISOR_IFS_PHYSDEV_H__
-
-/* Commands to HYPERVISOR_physdev_op() */
-#define PHYSDEVOP_PCI_CFGREG_READ       0
-#define PHYSDEVOP_PCI_CFGREG_WRITE      1
-#define PHYSDEVOP_PCI_INITIALISE_DEVICE 2
-#define PHYSDEVOP_PCI_PROBE_ROOT_BUSES  3
-#define PHYSDEVOP_IRQ_UNMASK_NOTIFY     4
-#define PHYSDEVOP_IRQ_STATUS_QUERY      5
-
-/* Read from PCI configuration space. */
-typedef struct {
-    /* IN */
-    u32 bus;                          /*  0 */
-    u32 dev;                          /*  4 */
-    u32 func;                         /*  8 */
-    u32 reg;                          /* 12 */
-    u32 len;                          /* 16 */
-    /* OUT */
-    u32 value;                        /* 20 */
-} PACKED physdevop_pci_cfgreg_read_t; /* 24 bytes */
-
-/* Write to PCI configuration space. */
-typedef struct {
-    /* IN */
-    u32 bus;                          /*  0 */
-    u32 dev;                          /*  4 */
-    u32 func;                         /*  8 */
-    u32 reg;                          /* 12 */
-    u32 len;                          /* 16 */
-    u32 value;                        /* 20 */
-} PACKED physdevop_pci_cfgreg_write_t; /* 24 bytes */
-
-/* Do final initialisation of a PCI device (e.g., last-moment IRQ routing). */
-typedef struct {
-    /* IN */
-    u32 bus;                          /*  0 */
-    u32 dev;                          /*  4 */
-    u32 func;                         /*  8 */
-} PACKED physdevop_pci_initialise_device_t; /* 12 bytes */
-
-/* Find the root buses for subsequent scanning. */
-typedef struct {
-    /* OUT */
-    u32 busmask[256/32];              /*  0 */
-} PACKED physdevop_pci_probe_root_buses_t; /* 32 bytes */
-
-typedef struct {
-    /* IN */
-    u32 irq;                          /*  0 */
-    /* OUT */
-/* Need to call PHYSDEVOP_IRQ_UNMASK_NOTIFY when the IRQ has been serviced? */
-#define PHYSDEVOP_IRQ_NEEDS_UNMASK_NOTIFY (1<<0)
-    u32 flags;                        /*  4 */
-} PACKED physdevop_irq_status_query_t; /* 8 bytes */
-
-typedef struct _physdev_op_st 
-{
-    u32 cmd;                          /*  0 */
-    u32 __pad;                        /*  4 */
-    union {                           /*  8 */
-        physdevop_pci_cfgreg_read_t       pci_cfgreg_read;
-        physdevop_pci_cfgreg_write_t      pci_cfgreg_write;
-        physdevop_pci_initialise_device_t pci_initialise_device;
-        physdevop_pci_probe_root_buses_t  pci_probe_root_buses;
-        physdevop_irq_status_query_t      irq_status_query;
-        u8                                __dummy[32];
-    } PACKED u;
-} PACKED physdev_op_t; /* 40 bytes */
-
-#endif /* __HYPERVISOR_IFS_PHYSDEV_H__ */
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/sched_ctl.h b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/sched_ctl.h
deleted file mode 100644 (file)
index 17daa7a..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Generic scheduler control interface.
- *
- * Mark Williamson, (C) 2004 Intel Research Cambridge
- */
-
-#ifndef __SCHED_CTL_H__
-#define __SCHED_CTL_H__
-
-/* Scheduler types */
-#define SCHED_BVT      0
-#define SCHED_FBVT     1
-#define SCHED_ATROPOS  2
-#define SCHED_RROBIN   3
-
-/* these describe the intended direction used for a scheduler control or domain
- * command */
-#define SCHED_INFO_PUT 0
-#define SCHED_INFO_GET 1
-
-/*
- * Generic scheduler control command - used to adjust system-wide scheduler
- * parameters
- */
-struct sched_ctl_cmd
-{
-    u32 sched_id;                     /*  0 */
-    u32 direction;                    /*  4 */
-    union {                           /*  8 */
-        struct bvt_ctl
-        {
-            /* IN variables. */
-            u32 ctx_allow;            /*  8: context switch allowance */
-        } PACKED bvt;
-
-        struct fbvt_ctl
-        {
-            /* IN variables. */
-            u32 ctx_allow;            /*  8: context switch allowance */
-        } PACKED fbvt;
-
-        struct rrobin_ctl
-        {
-            /* IN variables */
-            u64 slice;                /*  8: round robin time slice */
-        } PACKED rrobin;
-    } PACKED u;
-} PACKED; /* 16 bytes */
-
-struct sched_adjdom_cmd
-{
-    u32     sched_id;                 /*  0 */
-    u32     direction;                /*  4 */
-    domid_t domain;                   /*  8 */
-    u32     __pad;
-    union {                           /* 16 */
-        struct bvt_adjdom
-        {
-            u32 mcu_adv;    /* 16: mcu advance: inverse of weight */
-            u32 warp;       /* 20: time warp */
-            u32 warpl;      /* 24: warp limit */
-            u32 warpu;      /* 28: unwarp time requirement */
-        } PACKED bvt;
-
-        struct fbvt_adjdom
-        {
-            u32 mcu_adv;    /* 16: mcu advance: inverse of weight */
-            u32 warp;       /* 20: time warp */
-            u32 warpl;      /* 24: warp limit */
-            u32 warpu;      /* 28: unwarp time requirement */
-        } PACKED fbvt;
-
-        struct atropos_adjdom
-        {
-            u64 nat_period; /* 16 */
-            u64 nat_slice;  /* 24 */
-            u64 latency;    /* 32 */
-            u32 xtratime;   /* 36 */
-        } PACKED atropos;
-    } PACKED u;
-} PACKED; /* 40 bytes */
-
-#endif /* __SCHED_CTL_H__ */
diff --git a/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/trace.h b/linux-2.6.7-xen-sparse/include/asm-xen/hypervisor-ifs/trace.h
deleted file mode 100644 (file)
index b5458b9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/******************************************************************************
- * include/hypervisor-ifs/trace.h
- */
-
-#ifndef __HYPERVISOR_IFS_TRACE_H__
-#define __HYPERVISOR_IFS_TRACE_H__
-
-/* This structure represents a single trace buffer record. */
-struct t_rec {
-    u64 cycles;               /* 64 bit cycle counter timestamp */
-    u32 event;                /* 32 bit event ID                */
-    u32 d1, d2, d3, d4, d5;   /* event data items               */
-};
-
-/*
- * This structure contains the metadata for a single trace buffer.  The head
- * field, indexes into an array of struct t_rec's.
- */
-struct t_buf {
-    struct t_rec *data;     /* pointer to data area.  physical address
-                             * for convenience in user space code            */
-
-    unsigned long size;      /* size of the data area, in t_recs             */
-    unsigned long head;      /* array index of the most recent record        */
-
-    /* Kernel-private elements follow... */
-    struct t_rec *head_ptr; /* pointer to the head record                    */
-    struct t_rec *vdata;    /* virtual address pointer to data               */
-};
-
-#endif /* __HYPERVISOR_IFS_TRACE_H__ */
index b5e247472b6834234d1c88cb64efb6d7fdc7d599..30cf9236ebaa9d9e060ce2aea511032d23251c8f 100755 (executable)
@@ -101,3 +101,15 @@ for i in `find . -type l`; do rm -f $i; done
 # Create symlinks of files and directories which exist in the sparse source
 relative_lndir ${RS}
 rm -f mkbuildtree
+
+
+# Create links to the shared definitions of the hypervisor interface
+rm -rf ${AD}/include/asm-xen/hypervisor-ifs
+mkdir  ${AD}/include/asm-xen/hypervisor-ifs
+cd     ${AD}/include/asm-xen/hypervisor-ifs
+relative_lndir ../../../${RS}/../xen/include/hypervisor-ifs
+
+# Create a link to the shared definitions for the control interface
+cd ${AD}/include/asm-xen
+ln -sf ../../${RS}/../tools/python/xen/lowlevel/xu/domain_controller.h
+